﻿using Abp.Application.Services.Dto;
using Batman.Jianbei.Forum.Core.Domains.Dicts;

namespace Batman.Jianbei.Forum.Controllers.Dicts.Converts
{
    public static class PartitionConverter
    {
        /// <summary>
        /// 分区实体转换为NameValueDTO
        /// </summary>
        /// <param name="partition"></param>
        /// <returns></returns>
        public static NameValueDto ToNameValueDto(this Partition partition)
        {
            return new NameValueDto(partition.Name, partition.Id);
        }
    }
}
